<template>
  <div class="page">
    <div class="top">
      <div class="tabs-title2">
        <span style="margin-left: 20px; color: #2e61d7; font-weight: bold"
          >资料类别管理</span
        >
      </div>
    </div>
    <div class="content">
      <div class="left">
        <div class="e-tree-file">
          <div class="name">包件名称</div>
          <input class="ipt" type="text" placeholder="输入项目编号" />
          <span>
            <img src="@/assets/search.png" />
          </span>
          <el-tree
            :data="data"
            :props="defaultProps"
            @node-click="handleNodeClick"
          ></el-tree>
        </div>
      </div>
      <div class="right">
        <div class="left-ipt">
          <div style="margin-bottom: 10px">
            <span>上级类别名称</span>
            <el-input size="mini"></el-input>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;类别编号</span>
            <el-input size="mini"></el-input>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;类别名称</span>
            <el-input size="mini"></el-input>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;&emsp;&emsp;单位</span>
            <el-input size="mini"></el-input>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;是否启用</span>
            <el-select v-model="value" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;是否启用</span>
            <el-select v-model="value" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;集中采购</span>
            <el-radio v-model="radio" label="1">是</el-radio>
  <el-radio v-model="radio" label="2">否</el-radio>
          </div>
        </div>
        <div class="right-ipt">
          <div style="margin-bottom: 10px">
            <span>上级类别名称</span>
            <el-input size="mini"></el-input>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;类别编号</span>
            <el-input size="mini"></el-input>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;类别名称</span>
            <el-input size="mini"></el-input>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;&emsp;&emsp;单位</span>
            <el-input size="mini"></el-input>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;是否启用</span>
            <el-select v-model="value" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
          <div style="margin-bottom: 10px">
            <span>&emsp;&emsp;是否启用</span>
            <el-select v-model="value" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    data () {
        return {
            options: [
                {
                    value: '选项1',
                    label: '黄金糕',
                },
            ],
            value: '',
            radio: '1',
            data: [
                {
                    label: 'Lorem Ipsum1',
                    children: [
                        {
                            label: 'Lorem Ipsum1-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum1-1-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: 'Lorem Ipsum2',
                    children: [
                        {
                            label: 'Lorem Ipsum2-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum2-1-1',
                                },
                            ],
                        },
                        {
                            label: 'Lorem Ipsum2-2',
                            children: [
                                {
                                    label: 'Lorem Ipsum2-2-1',
                                },
                            ],
                        },
                    ],
                },
                {
                    label: 'Lorem Ipsum3',
                    children: [
                        {
                            label: 'Lorem Ipsum3-1',
                            children: [
                                {
                                    label: 'Lorem Ipsum3-1-1',
                                },
                            ],
                        },
                        {
                            label: 'Lorem Ipsum3-2',
                            children: [
                                {
                                    label: 'Lorem Ipsum3-2-1',
                                },
                            ],
                        },
                    ],
                },
            ],
            defaultProps: {
                children: 'children',
                label: 'label',
            },
        }
    },
    computed: {},
    components: {},
    created () {},
    mounted () {},
    methods: {
        handleNodeClick () {},
    },
}
</script>

<style lang="scss" scoped>
.page {
  width: 80%;
  height: 80%;
  margin: auto;
  margin-top: 20px;
  display: flex;
  flex-direction: column;

  .top {
    height: 30px;
    line-height: 30px;
    position: relative;
    .tabs-title2::before {
      content: "";
      height: 22px;
      width: 8px;
      border-radius: 40px;
      background-color: #2e61d7;
      display: block;
      position: absolute;
      left: 0px;
      top: 4px;
    }
  }
  .content {
    flex: 1;
    display: flex;
    margin-top: 10px;
    .left {
      width: 200px;

      border-radius: 5px;
      border: 1px solid #ccc;
      box-sizing: border-box;
      position: relative;
      .name {
        height: 40px;
        line-height: 40px;
        text-align: center;
        font-weight: 700;
        background-color: rgb(224, 231, 249);
      }
      .ipt {
        height: 30px;
        border-radius: 5px;
        margin-top: 15px;
        margin-bottom: 15px;
        margin-left: 12px;
        cursor: pointer;
        border: 1px solid #ccc;
      }
      img {
        width: 15px;
        height: 15px;
        position: absolute;
        top: 66px;
        right: 28px;
        cursor: pointer;
      }
      ::placeholder {
        color: #cccc;
        padding-left: 10px;
      }
    }
    .right {
      flex: 1;
      margin-left: 20px;
      display: flex;

      .left-ipt {
        width: 50%;
        margin-left: 20px;
        border: 0;
        ::v-deep.el-input--mini {
          width: 200px;
          margin-left: 10px;
        }
        ::v-deep.el-select .el-input__inner {
          width: 200px;
          margin-left: 10px;
        }
        ::v-deep.el-radio{
            margin-left: 10px;
        }
        span {
          color: rgb(166, 166, 166);
        }
      }
      .right-ipt {
        width: 50%;
        border: 0;
        ::v-deep.el-input--mini {
          width: 200px;
          margin-left: 10px;
        }
         ::v-deep.el-select .el-input__inner {
          width: 200px;
          margin-left: 10px;
        }
        span {
          color: rgb(166, 166, 166);
        }
      }
    }
  }
}
</style>